package org.tnaggs.project.model;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class League implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6483122287897371424L;
	
	private String leagueName;
	private long leagueId;
	private String season;
	private int year;
	private int admin;
	
	public League() {
		
	}
	
	public String getEncodedName() {
		String results = "";
		try {
			results = URLEncoder.encode(leagueName, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			System.err.println("Error encoding league name " + e);
		}
		return results;
	}
	
	public String getLeagueName() {
		return leagueName;
	}
	
	public void setLeagueName(String leagueName) {
		this.leagueName = leagueName;
	}
	
	public long getLeagueId() {
		return leagueId;
	}
	
	public void setLeagueId(long leagueId) {
		this.leagueId = leagueId;
	}
	
	public String getSeason() {
		return season;
	}
	
	public void setSeason(String string) {
		this.season = string;
	}

	public int getYear() {
		return year;
	}
	
	public void setYear(int year) {
		this.year = year;
	}
	
	public int getAdmin() {
		return admin;
	}
	
	public void setAdmin(int admin) {
		this.admin = admin;
	}
}
